{include file='home/uhead.html'}
<link rel="stylesheet" href="/css/wx-site.css" type="text/css" />
{literal}
<style type="text/css">
.ship-addr{margin:0 16px; border:1px solid #ddd; padding:8px; background-color:#fff}
.ship-addr .f-label{text-align:right; padding-right:5px}
.form-row .sel-zone{height:auto}
.sel-zone select{border:1px solid #ddd; display:block; line-height:24px; height:24px; margin-top:2px; width:75px}
.sel-zone span{display:inline-block}
</style>
{/literal}
<div class="context clear">
    <div class="ship-addr">
        <div class="info-tag">{if is_numeric($addr.id)}编辑收货地址{else}填写收货地址{/if}</div>


        <form class="cond-form" onsubmit="return true" action="/xdeliver/create" id="vipForm" method="post">
            <input type="hidden" name="callback" value="{if isset($smarty.get.callback)}{$smarty.get.callback}{/if}" />
            <input type="hidden" name="id" value="{$addr.id}" />
            <div class="form-row">
                <label class="f-label w80">配送区域：</label>
                <div class="div-auto sel-zone clear">
                    <input type="hidden" id="val_prov_id" value="{$addr.prov_id}"/>
                    <input type="hidden" id="val_city_id" value="{$addr.city_id}"/>
                    <input type="hidden" id="val_district_id" value="{$addr.district_id}"/>
                    <span id="prov">
                        <select name="prov_id" onchange="zone.chProv(this.value)" id="sel_prov">
                            <option value="">选择省份</option>
                            {foreach from=$prov_list item=m}
                            <option value="{$m.id}"{if $addr.prov_id==$m.id} selected="selected"{/if}>{substr($m.name,2)}</option>
                            {/foreach}
                        </select>
                    </span>

                    <span id="sel-city">
                        <select name="city_id" onchange="zone.chCity(this.value)" id="sel_city">
                            <option value="">选择城市</option>
                        </select>
                    </span>

                    <span id="sel-district">
                        <select name="district_id" id="sel_district">
                            <option value="">选择地区</option>
                        </select>
                    </span>

                </div>
                <span class="f-tip w20 ac">*</span>
            </div>

            <div class="form-row">
                <label class="f-label w80">街道地址：</label>
                <textarea class="form-area box-auto" name="address">{$addr.address}</textarea>
                <span class="f-tip w20 ac">*</span>
            </div>

            <div class="form-row">
                <label class="f-label w80">邮政编码：</label>
                <input class="form-i box-auto" type="text" name="zipcode" value="{$addr.zipcode}">
                <span class="f-tip w20 ac">*</span>
            </div>

            <div class="form-row">
                <label class="f-label w80">收货人姓名：</label>
                <input class="form-i box-auto" type="text" name="real_name" value="{$addr.real_name}">
                <span class="f-tip w20 ac">*</span>
            </div>

            <div class="form-row" style="display:none">
                <label class="f-label w80">电话号码：</label>
                <input class="form-i box-auto" type="text" name="phone">
                <span class="f-tip w20 ac">*</span>
            </div>

            <div class="form-row">
                <label class="f-label w80">手机号码：</label>
                <input class="form-i box-auto" type="text" name="mobile" value="{$addr.mobile}">
                <span class="f-tip w20 ac">*</span>
            </div>

            <div class="form-row">
                <label class="f-label w80">&nbsp;</label>
                <div class="div-auto">
                    <input type="submit" value="提交" class="abs_out">
                    <a href="javascript:;" onclick="G('vipForm').submit()" class="uiBtn BtnBlue BtnS5">提&nbsp;交</a>
                </div>
            </div>
        </form>
    </div>
</div><!--End Context-->
<span style="display:none" class="icon-heart"></span>
<script type="text/javascript" src="/js/zone.js"></script>
<script type="text/javascript">
var el_city = G('val_city_id');
var el_prov = G('val_prov_id');
var map;

if(el_prov){
    if(el_city){
        zone.chProv(el_prov.value,el_city.value);
    }else{
        zone.chProv(el_prov.value,'');
    }
}
</script>
{include file='home/foot.html'}